<?php

Route::get('/',['middleware' => 'auth',function(){
    return view('admin');
}]);
Route::get('/info',['middleware' => 'auth',function(){
    return view('info');
}]);

Route::group(['namespace' => 'Auth'], function()
{
    // 认证路由...
    Route::get('auth/login', 'AuthController@getLogin');
    Route::post('auth/login', 'AuthController@postLogin');
    Route::get('auth/logout', 'AuthController@getLogout');

    // 注册路由...
    Route::get('auth/register', 'AuthController@getRegister');
    Route::post('auth/register', 'AuthController@postRegister');

    // 密码重置链接的路由...
    Route::get('password/email', 'PasswordController@getEmail');
    Route::post('password/email', 'PasswordController@postEmail');

    // 密码重置的路由...
    Route::get('password/reset/{token}', 'PasswordController@getReset');
    Route::post('password/reset', 'PasswordController@postReset');
});

Route::group(['namespace' => 'System','prefix' => 'system'], function()
{
    Route::get('techValue/index', ['middleware' => ['permission:platform_system_techValue'],'uses' => 'SystemTechValuesController@index']);
    Route::any('techValue/list', ['middleware' => ['permission:platform_system_techValue'],'uses' => 'SystemTechValuesController@list_data']);
    Route::any('techValue/delete', ['middleware' => ['permission:platform_system_techValue'],'uses' => 'SystemTechValuesController@delete_data']);
    Route::any('techValue/add', ['middleware' => ['permission:platform_system_techValue'],'uses' => 'SystemTechValuesController@add_data']);
    Route::any('techValue/edit', ['middleware' => ['permission:platform_system_techValue'],'uses' => 'SystemTechValuesController@edit_data']);

    Route::get('systemCode/index', ['middleware' => ['permission:platform_system_systemCode'],'uses' => 'SystemCodesController@index']);
    Route::any('systemCode/list', ['middleware' => ['permission:platform_system_systemCode'],'uses' => 'SystemCodesController@list_data']);
    Route::any('systemCode/delete', ['middleware' => ['permission:platform_system_systemCode'],'uses' => 'SystemCodesController@delete_data']);
    Route::any('systemCode/add', ['middleware' => ['permission:platform_system_systemCode'],'uses' => 'SystemCodesController@add_data']);
    Route::any('systemCode/edit', ['middleware' => ['permission:platform_system_systemCode'],'uses' => 'SystemCodesController@edit_data']);

    Route::any('download/index', ['middleware' => ['permission:platform_system_download'],'uses' => 'DownloadController@index']);
    Route::any('download/download', ['middleware' => ['permission:platform_system_download'],'uses' => 'DownloadController@download']);


    Route::any('user/list', ['uses' => 'UsersController@list_data']);
    Route::any('user/delete', ['uses' => 'UsersController@delete_data']);
    Route::any('user/add', ['uses' => 'UsersController@add_data']);
    Route::any('user/edit', ['uses' => 'UsersController@edit_data']);
    Route::post('user/updateStatus', ['uses' => 'UsersController@updateStatus']);
    Route::post('user/deleteStation', ['uses' => 'UsersController@deleteStation']);
    Route::post('user/addStation', ['uses' => 'UsersController@addStation']);
    Route::post('user/password_edit', ['uses' => 'UsersController@password_edit']);
    Route::post('user/import', ['uses' => 'UsersController@import']);

    Route::get('permission/index', ['middleware' => ['permission:platform_system_permission'],'uses' => 'PermissionsController@index']);
    Route::any('permission/list', ['middleware' => ['permission:platform_system_permission'],'uses' => 'PermissionsController@list_data']);
    Route::any('permission/delete', ['middleware' => ['permission:platform_system_permission'],'uses' => 'PermissionsController@delete_data']);
    Route::any('permission/add', ['middleware' => ['permission:platform_system_permission'],'uses' => 'PermissionsController@add_data']);
    Route::any('permission/edit', ['middleware' => ['permission:platform_system_permission'],'uses' => 'PermissionsController@edit_data']);

});


Route::group(['namespace' => 'Personnel','prefix' => 'personnel','middleware' => 'auth'], function()
{
    Route::get('department/index', ['uses' => 'DepartmentsController@index']);
    Route::any('department/list', ['uses' => 'DepartmentsController@list_data']);
    Route::any('department/delete', ['uses' => 'DepartmentsController@delete_data']);
    Route::any('department/add', ['uses' => 'DepartmentsController@add_data']);
    Route::any('department/edit', ['uses' => 'DepartmentsController@edit_data']);
    Route::any('department/tree_data', ['uses' => 'DepartmentsController@list_tree_data']);

    Route::any('stationClass/delete', ['uses' => 'StationClassesController@delete_data']);
    Route::any('stationClass/add', ['uses' => 'StationClassesController@add_data']);
    Route::any('stationClass/edit', ['uses' => 'StationClassesController@edit_data']);
    Route::any('stationClass/tree_data', ['uses' => 'StationClassesController@list_tree_data']);

    Route::get('station/index', ['uses' => 'StationsController@index']);
    Route::any('station/list', ['uses' => 'StationsController@list_data']);
    Route::any('station/delete', ['uses' => 'StationsController@delete_data']);
    Route::any('station/add', ['uses' => 'StationsController@add_data']);
    Route::any('station/edit', ['uses' => 'StationsController@edit_data']);

    Route::any('station/permission', ['uses' => 'StationsController@permission']);
    Route::get('station/permissionEdit', ['uses' => 'StationsController@get_permission_edit']);
    Route::post('station/permissionEdit', ['uses' => 'StationsController@post_permission_edit']);
});


Route::group(['namespace' => 'Teacher','prefix' => 'teacher','middleware' => 'auth'], function()
{
    Route::get('teacher/index', ['uses' => 'TeachersController@index']);
    Route::any('teacher/list', ['uses' => 'TeachersController@list_data']);
    Route::any('teacher/edit', ['uses' => 'TeachersController@edit_data']);
    Route::post('teacher/info_edit', ['uses' => 'TeachersController@info_edit']);
    Route::post('teacher/photo_edit', ['uses' => 'TeachersController@photo_edit']);
    Route::get('teacher/honour', ['uses' => 'TeachersController@honour']);
    Route::get('teacher/honour_edit', ['uses' => 'TeachersController@honour_edit']);

    Route::any('certificate/list', ['uses' => 'CertificatesController@list_data']);
    Route::any('certificate/delete', ['uses' => 'CertificatesController@delete_data']);
    Route::any('certificate/add', ['uses' => 'CertificatesController@add_data']);

    Route::any('composition/list', ['uses' => 'CompositionsController@list_data']);
    Route::any('composition/delete', ['uses' => 'CompositionsController@delete_data']);
    Route::any('composition/add', ['uses' => 'CompositionsController@add_data']);

    Route::any('study/list', ['uses' => 'StudiesController@list_data']);
    Route::any('study/delete', ['uses' => 'StudiesController@delete_data']);
    Route::any('study/add', ['uses' => 'StudiesController@add_data']);

});


Route::group(['namespace' => 'Student','prefix' => 'student','middleware' => 'auth'], function()
{
    Route::get('student/index', ['uses' => 'StudentsController@index']);
    Route::any('student/list', ['uses' => 'StudentsController@list_data']);
    Route::any('student/delete', ['uses' => 'StudentsController@delete_data']);
    Route::any('student/add', ['uses' => 'StudentsController@add_data']);
    Route::any('student/edit', ['uses' => 'StudentsController@edit_data']);
    Route::any('student/deleteClbum', ['uses' => 'StudentsController@delete_clbum']);
    Route::any('student/import', ['uses' => 'StudentsController@import']);

    Route::any('resume/list', ['uses' => 'StudentResumesController@list_data']);
    Route::any('resume/delete', ['uses' => 'StudentResumesController@delete_data']);
    Route::any('resume/add', ['uses' => 'StudentResumesController@add_data']);

    Route::any('schoolCensus/list', ['uses' => 'StudentSchoolCensusesController@list_data']);
    Route::any('schoolCensus/delete', ['uses' => 'StudentSchoolCensusesController@delete_data']);
    Route::any('schoolCensus/add', ['uses' => 'StudentSchoolCensusesController@add_data']);

    Route::get('relation/index', ['uses' => 'StudentRelationsController@index']);
    Route::any('relation/list', ['uses' => 'StudentRelationsController@list_data']);
    Route::any('relation/delete', ['uses' => 'StudentRelationsController@delete_data']);
    Route::any('relation/add', ['uses' => 'StudentRelationsController@add_data']);
    Route::any('relation/edit', ['uses' => 'StudentRelationsController@edit_data']);
});

Route::group(['namespace' => 'Clbum','prefix' => 'clbum','middleware' => 'auth'], function()
{
    Route::get('grade/index', ['uses' => 'GradesController@index']);
    Route::any('grade/list', ['uses' => 'GradesController@list_data']);
    Route::any('grade/delete', ['uses' => 'GradesController@delete_data']);
    Route::any('grade/add', ['uses' => 'GradesController@add_data']);
    Route::any('grade/edit', ['uses' => 'GradesController@edit_data']);

    Route::get('clbum/index', ['uses' => 'ClbumsController@index']);
    Route::any('clbum/list', ['uses' => 'ClbumsController@list_data']);
    Route::any('clbum/delete', ['uses' => 'ClbumsController@delete_data']);
    Route::any('clbum/add', ['uses' => 'ClbumsController@add_data']);
    Route::any('clbum/edit', ['uses' => 'ClbumsController@edit_data']);
    Route::any('clbum/student', ['uses' => 'ClbumsController@student_index']);
    Route::get('clbum/addStudent', ['uses' => 'ClbumsController@get_add_student']);
    Route::post('clbum/addStudent', ['uses' => 'ClbumsController@post_add_student']);

    Route::any('clbumExt/edit', ['uses' => 'ClbumExtsController@edit_data']);


});



